<?php

use yii\helpers\Html;
use yii\widgets\LinkPager;
use yii\widgets\Pjax;
use app\common\Functions;
?>
<?php
    $orderDay  = "";
    $indexColor  = 0;
    $dayColors = array("bg-yellow","bg-aqua","bg-green","bg-blue");


?>

<ul class="timeline timeline-inverse document-tborder-log">
    <?php foreach ($orderResumes as $orderResume): ?>

        <?php if ($orderResume['createDay']!=$orderDay): ?>

                <li class="time-label">
                    <?php
                    $orderDay = $orderResume['createDay'];
                    $color =  $dayColors[$indexColor%4];
                    $indexColor++;
                    ?>
                    <span class="<?= $color?>">
                        <?= $orderDay ?>
                    </span>
                </li>
        <?php endif; ?>
        <li>
            <!-- timeline icon -->
            <?php
            $color =  $dayColors[$indexColor%4];
            $indexColor++;
            ?>
            <i class="fa fa-bug <?= $color?>"></i>
            <div class="timeline-item">
                <span class="time"><i class="fa  fa-clock-o"></i> <?= $orderResume['create_date']?></span>

                <h3 class="timeline-header">
                    <?= $orderResume['create_staff_name']?>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <?= Html::encode(   Functions::getDomainsName('oa_order_resumes','resumes_type_id', $orderResume['resumes_type_id'])  ) ?>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <?php if ( !$orderResume['staff_id']): ?>
                        <?= $orderResume['create_staff_name']?> ———>
                    <?php else: ?>
                        <?= $orderResume['create_staff_name']?> ———> <?= $orderResume['staff_name']?>。
                    <?php endif; ?>
                </h3>


                <div class="timeline-body">
                   处理描述：
                    <?= $orderResume['remark']?>。

                    <br/>
                    <?php if ( $orderResume['last_state'] == $orderResume['next_state']): ?>
                         订单状态：<?= Html::encode(   Functions::getDomainsName('order','state', $orderResume['last_state'])  )?>。
                    <?php else: ?>
                        订单状态：<?= Html::encode(   Functions::getDomainsName('order','state', $orderResume['last_state'])  )?>  ———>  <?= Html::encode(   Functions::getDomainsName('order','state',$orderResume['next_state'])  ) ?>状态。
                    <?php endif; ?>



                </div>

                <div class="timeline-footer">

                </div>
            </div>
        </li>

    <?php endforeach; ?>
    <li>
        <i class="fa fa-clock-o bg-gray"></i>
    </li>
</ul>




